home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 35
/
q35.d81
/
t.calcal v1
< prev
next >
Wrap
Text File
|
2022-08-28
|
8KB
|
172 lines
C A L C A L V 1
Program and Text by Fender Tucker
ML Printer Routines by Bob Markland
It all began with a letter all the way from Bossier City, LA from Lyman
Bertsch, a loyal C-128 user. He sent me a copy of an old calendar program
(with docs) from Compute's Gazette, and asked if we had a program that
would do the same thing, except better. The original program was for the
C-64 and was hardcoded to work only with Commodore 7-pin printers. He
wanted a version that would run in the 80-column 128 mode and would support
8-pin printers.
Well, when someone throws a gauntlet my way, I usually pick it up and
add it to my extensive glove collection but this time I thought, "Is he
saying that I can't improve on a program written a decade ago for Compute?"
Of course, he wasn't saying that, but it helped me to see it that way and
take the challenge.
NOTE: There is a very powerful calendar program from ed bell called TOTAL
RECALL on LS 128 #20, but it's script-driven and designed for making a
variety of calendars in various sizes. I recommended it to Lyman at first
but he found that it did much more than he needed. He wanted a small
program that would allow him to enter text on a calendar on screen, and
save it to disk or send it to printer.
My first problem was: how do you figure out the days of a particular
month? Then I remembered that I wrote a little BASIC program a long time
ago for LOADSTAR 64 that took any day in modern history and told you which
day of the week it was. It used about five lines of BASIC code to do the
figuring. I could use that algorithm to find which day of the week the 1st
of a month was on, then the rest of the calendar would follow naturally.
I figured the rest would be easy. I'd have the program make a nice-
looking calendar on the screen, and then I'd use the very first version of
Jon Mattson's CONTROL80, which had a DUMP command, to send the screen
directly to the printer. What could be easier?
Well, there were problems. DUMP worked, but it uses your printer's
default line spacing so you get vertical lines that don't touch. You've
seen what results when you try to print boxes made with the Commodore
graphics characters. It's not pretty, and frankly, it looked much cheesier
than the printout that the original Gazette program produced. That wouldn't
do.
So I got rid of CONTROL80's DUMP command and wrote code that would
print the screen, using a line spacing that would make the vertical lines
touch. Now the problem was that the calendar looked "squashed", much wider
than it was tall. On the screen it looked fine, with three lines of text
possible for each day of the month, but the printout was embarrassing. So I
asked Bob Markland, who has written a lot of printer routines for LOADSTAR
64, for help. He came through in flying colors.
And CALCAL V1 was born.
CALCAL: THE CALCULATOR
----------------------
When you boot CALCAL (or CALENDAR CALCULATOR) you start in the
CALCULATOR mode. There are four boxes on the screen showing:
MONTH DATE YEAR DAY OF WEEK
There will be a date in the boxes and the fourth box will show the day of
the week that it fell on. That's about all the Calculator does: you give it
a date in history and it'll immediately show you the day of the week it
falls on. You change the dates by using the CRSR RIGHT and LEFT keys to
move the highlight to MONTH, DATE or YEAR. Then use the CRSR UP and DOWN
keys to increment or decrement the highlighted information.
You can use the F-keys to increment or decrement the year by 10 or 100
years, so it doesn't take forever to get to 1607 or 2525.
Press C to go to a calendar of the month currently showing in the
boxes.
Press T to toggle whether the calendar will be light text on a black
screen, or dark text on a white screen. Actually, the text is the same
color, mostly. I just thought that some people may prefer to use a
cheerier, white calendar. Most programs on a C-64/128 use a black
background because all the colors look good on black, but for some
applications, the black can be oppressive.
Press Q to quit to LOADSTAR 128 if there's a LS disk in the currently
active drive.
CALCAL: THE CALENDAR
--------------------
Once you go to the Calendar Mode, a small help screen will pop up
showing you the various hot keys for this mode. They're all F-keys since
you will be using all of the other keys for writing on your calendar.
Press a key and the help box disappears. Now you're ready to customize
the calendar for your needs. You have a green cursor that can be moved
anywhere on the screen. You can print anything you want on the screen,
except on lines, numbers and some of the letters. DELETE works. INSERT
doesn't. CLR (SHIFT-HOME) asks if you're sure, then clears all of your text
from the calendar if you answer yes.
You have three rows and 10 characters per row to enter any info you
want into a date. You also have some free space before and after the first
and last days of the month, depending on when the month starts and ends.
You can't type outside the calendar.
F2 will show you the help box again to refresh your memory about what
the F-keys do.
F1 and F3 are for LOADing and SAVEing the currently displayed calendar.
It will create a 17-block file on the disk in the active drive. Be sure you
have 17 blocks free before SAVEing. You're not asked for names or any kind
of input. If there's not a saved file, nothing will be loaded. The screen
will simply not change. Therefore, if you don't know if there is a saved
file for the month you're in, try F1. It'll either load or there isn't
one.
NOTE: I've included a dummy file for August 1997 on the LOADSTAR 128 #35
disk. Display that month and press F1 to see how loading and saving works.
Press F5 to print the displayed month's calendar, including any text
you have on the screen. Be sure your printer is ready. It will use one
sheet of paper and print a calendar that is essentially twice as tall as
the one on the screen, WITH connected vertical lines. Even though the
printout is twice as tall as the screen, on paper it looks about the same.
The three lines of text will be squeezed up towards the top of each date's
box, leaving you plenty of room to pencil in information directly on the
calendar after you've posted it on the wall or refrigerator.
Thanks to Bob Markland, the printed calendar has the days of the week
listed at the top (unlike the screen), and also, at the bottom, handy mini-
calendars of the month preceding and the month following the printed month.
Just as in real, professional calendars.
Press F7 to go back to the CALCULATOR mode. You should save your
calendar before leaving the CALENDAR mode, if you want it saved.
NOTE: If you have a calendar showing and you go back to the CALCULATOR
mode, then come back to the CALENDAR mode with the same month showing, your
info will still be intact. However, it's still a good idea to save the
month before leaving the CALENDAR mode because it's possible to lose your
info if you toggle colors of the calendar before coming back.
END OF STORY
------------
That's the CALCAL story. In a future version I may be able (with Bob's
help) to allow for more info per date box by having the text printed in the
subscript and condensed mode. If so, I'd need to abandon the idea of using
the screen as the calendar and open up a bigger text box for your info.
Then the info wouldn't show on the screen; only on the printout. That's how
the Gazette version worked. I like being able to see "almost what you get"
as the program now does, but maybe some of you users will have some
suggestions for V2? If so, send 'em on in.
In the meantime, CALCAL is dedicated to Mr. Lyman Bertsch of Bossier
City LA, the city that hogged all but one of the casino riverboats on the
Red River. It would have been fine if Bossier had been on the west side of
Shreveport rather than on the east. Then all those rich Texans wouldn't
have to drive through Shreveport on their way to dropping millions for the
poor people